package sch.frog.behavioral.mediator;

public class MediatorDemo {

    public static void main(String[] args){
        Colleague c1 = new ConcreteColleagueA();
        Colleague c2 = new ConcreteColleagueB();

        Mediator m = new ConcreteMediator();

        m.setColleague1(c1);
        m.setColleague2(c2);

        // 无限递归!!!
        c1.run("哈哈");

    }

}
